home *** CD-ROM | disk | FTP | other *** search
- on setTopicButtons
- global browserTopicsLine, buttonStates, pictureButton, textButton, mapButton, printButton, pictureState, textState, mapState, printState
- if browserTopicsLine = 0 then
- set pictureState to 0
- set textState to 0
- set mapState to 0
- set printState to 0
- else
- set oldDelimiter to the itemDelimiter
- set the itemDelimiter to ":"
- set buttonInfo to line browserTopicsLine of buttonStates
- set pictureState to value(word 2 of item 2 of buttonInfo)
- set textState to value(word 2 of item 3 of buttonInfo)
- set mapState to value(word 2 of item 4 of buttonInfo)
- set printState to value(word 2 of item 5 of buttonInfo)
- set the itemDelimiter to oldDelimiter
- end if
- setButtonState(pictureState, pictureButton)
- setButtonState(textState, textButton)
- setButtonState(mapState, mapButton)
- setButtonState(printState, printButton)
- setButtonCursor(pictureState, pictureButton)
- setButtonCursor(textState, textButton)
- setButtonCursor(mapState, mapButton)
- setButtonCursor(printState, printButton)
- end
-
- on setButtonState buttonState, buttonSprite
- if buttonState then
- enableButton(buttonSprite)
- else
- disableButton(buttonSprite)
- end if
- end
-
- on setButtonCursor buttonState, buttonSprite
- global fingerCursor
- if buttonState then
- set the cursor of sprite buttonSprite to fingerCursor
- else
- set the cursor of sprite buttonSprite to -1
- end if
- end
-
- on enableButton whichSprite
- changeButtonCast(whichSprite, "ENABLED")
- end
-
- on disableButton whichSprite
- changeButtonCast(whichSprite, "DISABLED")
- end
-
- on activateButtonKeepActivated whichSprite
- changeButtonCast(whichSprite, "ACTIVATED")
- updateStage()
- repeat while not (the mouseUp)
- nothing()
- end repeat
- end
-
- on activateButtonThenEnable whichSprite
- changeButtonCast(whichSprite, "ACTIVATED")
- updateStage()
- repeat while not (the mouseUp)
- nothing()
- end repeat
- changeButtonCast(whichSprite, "ENABLED")
- end
-
- on changeButtonCast whichSprite, mode
- set buttonType to word 1 of the name of cast the castNum of sprite whichSprite
- set newCastName to buttonType && mode
- set the castNum of sprite whichSprite to the number of cast newCastName
- end
-
- on isActivated whichSprite
- if word 2 of the name of cast the castNum of sprite whichSprite = "ACTIVATED" then
- return 1
- else
- return 0
- end if
- end
-
- on isEnabled whichSprite
- if word 2 of the name of cast the castNum of sprite whichSprite = "ENABLED" then
- return 1
- else
- return 0
- end if
- end
-
- on isDisabled whichSprite
- if word 2 of the name of cast the castNum of sprite whichSprite = "DISABLED" then
- return 1
- else
- return 0
- end if
- end
-